package com.itbaizhan.test.b;

public class Animal02 {
    public void shout() {
        System.out.println("大声叫");
    }
}
/*interface aa{
    public void bb();
}*/
class Dog2 extends Animal02{
    public void shout(){
        System.out.println("旺旺旺！");
    }
    public static void seeDoor(){
        System.out.println("看门中");
    }
}
/*class Dog2 implements Animal02{
    public void shout(){
        System.out.println("旺旺旺！");
    }
    public static void seeDoor(){
        System.out.println("看门中");
    }

    @Override
    public void bb() {
        System.out.println(1111);
    }*/

   /* public static void main(String[] args) {
        Dog2 d = new Dog2();
        d.bb();
    }
}*/
class Cat2 extends Animal02 {
    public void shout(){
        System.out.println("喵喵喵");
    }
    public void catchMouse(){
        System.out.println("捉老鼠");
    }
}
//不同的类实现接口，给接口中的方法不同的实现 接口不是用来new
/*
class Cat2 implements aa {

    @Override
    public void bb() {
        System.out.println(222);
    }

    public static void main(String[] args) {
        Cat2 c= new Cat2();
        c.bb();
        Dog2 d = new Dog2();
        d.bb();
    }
}*/
